#include <bits/stdc++.h>
using namespace std;
using LL = long long;

const int N = 3e3+50, M = 3e3+50;



int n, k;

char s[N];
int a[N];

vector<int> ans[M];

int check(char s[]) {
	static char t[N];
	strcpy(t, s);
	// printf("%s\n", t);
	int cnt = 0;
	while (1) {
		bool update = false;
		++cnt;
		for (int i=0; i<n-1; ++i) {
			if (t[i] == 'R' && t[i+1] == 'L') {
				t[i] = 'L';
				t[i+1] = 'R';
				++i;
				update = true;
				ans[cnt].push_back(i);
			}
		}
		// printf("%s\n", t);
		if (!update)
			break;
	}
	return cnt;
}

int main(int argc, char const *argv[])
{
	scanf("%d%d", &n, &k);
	scanf("%s", s);

	int anss = check(s);
	// fprintf(stderr, "anss=%d\n", anss);
	--anss;
	int sum = 0;
	for (int i=1; i<=anss; ++i)
		sum += (int)ans[i].size();
	if (sum < k || anss > k) {
		puts("-1");
		return 0;
	}
	bool suc = false;
	for (int i=1; i<=anss; ++i) {
		int now = 0, sz = (int)ans[i].size();
		while (k > anss-i+1 && now < sz) {
			printf("1 %d\n", ans[i][now++]);
			--k;
		}

		if (k == anss-i+1 && now < sz) {
			suc = true;
			printf("%d", sz-now);
			for (int j=now; j<sz; ++j) {
				printf(" %d", ans[i][j]);
			}
			putchar('\n');

			for (int j=i+1; j<=anss; ++j) {
				printf("%d", (int)ans[j].size());
				for (int x : ans[j])
					printf(" %d", x);
				putchar('\n');
			}
			break;
		}
	}
	assert(suc);


	
	// check(s);

    return 0;
}

